From: Camila Ayres Date: Thu, 3 Apr 2025 17:10:15 +0000 (+0200) Subject: fix(PinState): don't trigger sync when file's PinState changed to Unspecified. X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2^2~29^2~1 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22Program/%22http:/www.example.com/cgi/%22https:/%22Program?a=commitdiff_plain;h=38b71912fbbe19f4e87fac54122c74561fba2f1d;p=nextcloud-desktop.git fix(PinState): don't trigger sync when file's PinState changed to Unspecified. LibreOffice/Microsoft office might touch the files for unknown reasons, creating a constant sync state (icon) visible in the parent folder. This fix excludes PinState changes from a new sync if the trigger might have been an external application. Signed-off-by: Camila Ayres --- diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 62aa980cd..f0454c97f 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -652,8 +652,11 @@ void Folder::slotWatchedPathChanged(const QStringView &path, const ChangeReason if (record.isValid() && !FileSystem::fileChanged(path.toString(), record._fileSize, record._modtime) && _vfs) { spurious = true; - if (auto pinState = _vfs->pinState(relativePath.toString())) { + qCDebug(lcFolder) << "PinState for" << relativePath << "is" << *pinState; + if (*pinState == PinState::Unspecified) { + spurious = false; + } if (*pinState == PinState::AlwaysLocal && record.isVirtualFile()) { spurious = false; }